<div id="Backlog">
  <div class="m-subheader">
    <div class="row align-items-center">
      <div class="mr-auto col-auto">
        <h3 class="m-subheader__title m-subheader__title--separator">
          <span>流程监控</span>
        </h3>
        <span class="m-section__sub">

        </span>
      </div>
    </div>
  </div>
  <div class="m-content">
    <div class="m-portlet m-portlet--mobile" style="margin: 0;">
      <div class="m-portlet__body" style="height: 724px;">
        <form class="horizontal-form" autocomplete="off">
          <div class="m-form m-form--label-align-right">
            <div class="row align-items-center m--margin-bottom-10">
              <div class="col-xl-12" style="padding: 0;">
                <div class="form-group m-form__group align-items-center">
                  <div class="input-group">
                    <input [(ngModel)]="filterText" name="filterText" autoFocus class="form-control m-input"
                      [placeholder]="l('SearchWithThreeDot')" type="text">
                    <span class="input-group-btn">
                      <button (click)="getOutSourcingAppLicationWorkflow()" class="btn btn-primary" type="submit"><i
                          class="flaticon-search-1" [attr.aria-label]="l('Search')"></i></button>
                    </span>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </form>
        <div class="row align-items-center">
          <!--<Primeng-TurboTable-Start>-->
          <div class="primeng-datatable-container" [busyIf]="primengTableHelper.isLoading">
            <p-table #dataTable (onLazyLoad)="getOutSourcingAppLicationWorkflow($event)"
              [value]="getWorkflowInstanceViewDtos" rows="{{primengTableHelper.defaultRecordsCountPerPage}}"
              [paginator]="false" [lazy]="true" [scrollable]="true" ScrollWidth="100%"
              [responsive]="primengTableHelper.isResponsive" [resizableColumns]="true">
              <ng-template pTemplate="header">
                <tr>
                  <th style="width: 100px">
                    操作
                  </th>
                  <th style="width: 30px">
                    序号
                  </th>
                  <th style="width: 150px">
                    流程类型
                  </th>
                  <th style="width: 80px">
                    版本号
                  </th>
                  <th style="width: 150px">
                    发起人
                  </th>
                  <th style="width: 150px">
                    当前审批节点
                  </th>
                  <th style="width: 150px">
                    流程状态
                  </th>
                  <th style="width: 150px">
                    审批人
                  </th>
                  <th style="width: 150px">
                    创建日期
                  </th>
                </tr>
              </ng-template>
              <ng-template pTemplate="body" let-record="$implicit">
                <tr>
                  <td style="width: 100px">
                    <button (click)="Detail(record)" class="btn btn-primary mb-3">
                      <i class="fa fa-pencil-alt"></i> 查看详情
                    </button>
                  </td>
                  <td style="width: 30px">
                    <span class="ui-column-title"> </span> {{record.sortId}}
                  </td>
                  <td style="width: 150px">
                    <span class="m--font-boldest"> {{record.workflowDefinitionId}}</span>
                  </td>
                  <th style="width: 80px">
                    {{record.version}}
                  </th>

                  <td style="width: 150px">
                    <div [ngSwitch]="record.poccessorName">
                      <div *ngSwitchCase="">
                        <div class="m-loader m-loader--warning" style="width: 30px; display: inline-block;"></div>
                      </div>
                      <div *ngSwitchDefault>
                        <h6>
                          <font style="vertical-align: inherit;">
                            <span class="m--font-metal"> <i class="la la-user"></i></span>
                            <span class="m--font-bold"> {{record.poccessorId}}</span>
                          </font><br>
                        </h6>
                        <h6>
                          <span class="m--font-metal">
                            <font style="vertical-align: inherit;">
                              {{record.poccessorName}}， {{record.poccessorOuName}}
                            </font>
                          </span>
                        </h6>
                      </div>
                    </div>
                  </td>
                  <td style="width: 150px">
                    <div [ngSwitch]="record.currentStepName">
                      <div *ngSwitchCase="">
                        <div class="m-loader m-loader--warning" style="width: 30px; display: inline-block;"></div>
                      </div>
                      <div *ngSwitchDefault>
                        <span class="m-badge m-badge--info m-badge--dot"></span>&nbsp;
                        <span class="m--font-bold"> {{record.currentStepName}}</span>
                      </div>
                    </div>
                  </td>
                  <td style="width: 150px">
                    <div [ngSwitch]="record.status">
                      <div *ngSwitchCase="">
                        <div class="m-loader m-loader--warning" style="width: 30px; display: inline-block;"></div>
                      </div>
                      <div *ngSwitchDefault>
                        <span *ngIf="record.status==0" class="label m-badge m-badge--primary m-badge--wide"
                          data-toggle="tooltip" title="运行" data-placement="top">
                          运行
                        </span>
                        <span *ngIf="record.status==1" class="label m-badge m-badge--warning m-badge--wide"
                          data-toggle="tooltip" title="已暂停" data-placement="top">
                          已暂停
                        </span>
                        <span *ngIf="record.status==2" class="label m-badge m-badge--success m-badge--wide"
                          data-toggle="tooltip" title="完成" data-placement="top">
                          完成
                        </span>
                        <span *ngIf="record.status==3" class="label m-badge m-badge--danger m-badge--wide"
                          data-toggle="tooltip" title="已终止" data-placement="top">
                          已终止
                        </span>
                      </div>
                    </div>
                  </td>
                  <td style="width: 150px">
                    <div [ngSwitch]="record.currentStepUserName">
                      <div *ngSwitchCase="">
                        <div class="m-loader m-loader--warning" style="width: 30px; display: inline-block;"></div>
                      </div>
                      <div *ngSwitchDefault>
                        <span class="m-badge m-badge--info m-badge--dot"></span>&nbsp;
                        <span class="m--font-bold"> {{record.currentStepUserName}}</span>
                      </div>
                    </div>
                  </td>
                  <td style="width: 150px">
                    {{record.createTime | date:'short' }}
                  </td>
                </tr>
              </ng-template>
            </p-table>
            <div class="primeng-no-data" *ngIf="primengTableHelper.totalRecordsCount == 0">
              {{'NoData' | localize}}
            </div>
            <div class="primeng-paging-container">
              <p-paginator [rows]="primengTableHelper.defaultRecordsCountPerPage" #paginator
                (onPageChange)="getOutSourcingAppLicationWorkflow($event)"
                [totalRecords]="primengTableHelper.totalRecordsCount"
                [rowsPerPageOptions]="primengTableHelper.predefinedRecordsCountPerPage">
              </p-paginator>
              <span class="total-records-count">
                {{'TotalRecordsCount' | localize:primengTableHelper.totalRecordsCount}}
              </span>
            </div>
          </div>
          <!--<Primeng-TurboTable-End>-->
        </div>
      </div>
    </div>
  </div>
  <flowworkauditdetailmodel #flowworkauditDetailModel></flowworkauditdetailmodel>
  <flowworkauditmodel #flowworkauditform></flowworkauditmodel>
</div>